import { GET_TOKEN } from "@/utils";
import { Navigate } from "react-router-dom"
function HaveToken({ children }) {
    const token = GET_TOKEN()
    if (token === "" || token === undefined || token === null) {
        return <Navigate to={"/login"} replace />
    } else {
     return <>{children}</>
    }
}
export { HaveToken }